package com.example.demo.dao;

import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * @Author: zcb
 * @Description:
 * @Date: 2021/9/27
 */
public interface UserDao {

    User getOne(String name);

    int insertUser(User user);

    User firstUser(@Param("name") String name, @Param("companyId") Byte companyId);

    List<User> userOrder(@Param("name") String name, @Param("companyId") Byte companyId);

    int updateUserOrderAmount(@Param("userId") Long userId,
                              @Param("amount") int amount,
                              @Param("companyId") Byte companyId);
}
